﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using ns_GetOperation;

namespace iChat.AjaxResponse
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (s_c_GetOperation.ServerOperation.Register(Request["name"], Request["password"]))
            {
                Response.Write("suceeded");
            }
            else 
            {
                Response.Write("failed");
            }
            /*try
            {

                if (Request["name"] == "" || Request["pw"] == "")
                {
                    Response.Write("failed");
                    return;
                }
                User tempuser = null;
                tempuser = DB_USER_PROFILE.GetUser(Request["name"]);
                if (tempuser != null)
                {
                    Response.Write("failed");
                    return;
                }
                tempuser = new User(Request["name"], Request["pw"], "sent");
                DB_USER_PROFILE.addUser(tempuser);
                Session["name"] = tempuser.Name;
                Response.Write("suceeded");
                return;
            }
            catch (System.Exception E)
            {
                Response.Write("failed");
                return;
            }*/
        }
    }
}
